package model.diagram.part;

import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import model.Actor;
import model.ActorPackActor;
import model.ActorsPackage;
import model.AssociationActorToSerie;
import model.Episode;
import model.EpisodesPackEpisode;
import model.EpisodesPackage;
import model.ModelPackage;
import model.Role;
import model.Season;
import model.SeasonPackage;
import model.SeasonsPackSeason;
import model.Serie;
import model.SerieRole;
import model.SeriesPackSerie;
import model.SeriesPackage;
import model.Workspace;
import model.diagram.edit.parts.ActorEditPart;
import model.diagram.edit.parts.ActorPackActorEditPart;
import model.diagram.edit.parts.ActorsPackageEditPart;
import model.diagram.edit.parts.AssociationActorToSerieEditPart;
import model.diagram.edit.parts.EpisodeEditPart;
import model.diagram.edit.parts.EpisodesPackEpisodeEditPart;
import model.diagram.edit.parts.EpisodesPackageEditPart;
import model.diagram.edit.parts.RoleEditPart;
import model.diagram.edit.parts.SeasonEditPart;
import model.diagram.edit.parts.SeasonPackageEditPart;
import model.diagram.edit.parts.SeasonsPackSeasonEditPart;
import model.diagram.edit.parts.SerieEditPart;
import model.diagram.edit.parts.SerieRoleEditPart;
import model.diagram.edit.parts.SeriesPackSerieEditPart;
import model.diagram.edit.parts.SeriesPackageEditPart;
import model.diagram.edit.parts.WorkspaceEditPart;
import model.diagram.providers.ModelElementTypes;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.notation.View;

/**
 * @generated
 */
public class ModelDiagramUpdater {

	/**
	 * @generated
	 */
	public static List<ModelNodeDescriptor> getSemanticChildren(View view) {
		switch (ModelVisualIDRegistry.getVisualID(view)) {
		case WorkspaceEditPart.VISUAL_ID:
			return getWorkspace_1000SemanticChildren(view);
		}
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelNodeDescriptor> getWorkspace_1000SemanticChildren(
			View view) {
		if (!view.isSetElement()) {
			return Collections.emptyList();
		}
		Workspace modelElement = (Workspace) view.getElement();
		LinkedList<ModelNodeDescriptor> result = new LinkedList<ModelNodeDescriptor>();
		{
			ActorsPackage childElement = modelElement.getGroupOfActors();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == ActorsPackageEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
			}
		}
		{
			SeriesPackage childElement = modelElement.getGroupOfSeries();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == SeriesPackageEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
			}
		}
		for (Iterator<?> it = modelElement.getSeasonsPackage().iterator(); it
				.hasNext();) {
			SeasonPackage childElement = (SeasonPackage) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == SeasonPackageEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getEpisodesPackage().iterator(); it
				.hasNext();) {
			EpisodesPackage childElement = (EpisodesPackage) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == EpisodesPackageEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getActors().iterator(); it.hasNext();) {
			Actor childElement = (Actor) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == ActorEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getSeries().iterator(); it.hasNext();) {
			Serie childElement = (Serie) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == SerieEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getSeasons().iterator(); it
				.hasNext();) {
			Season childElement = (Season) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == SeasonEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getEpisodes().iterator(); it
				.hasNext();) {
			Episode childElement = (Episode) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == EpisodeEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		for (Iterator<?> it = modelElement.getRoles().iterator(); it.hasNext();) {
			Role childElement = (Role) it.next();
			int visualID = ModelVisualIDRegistry.getNodeVisualID(view,
					childElement);
			if (visualID == RoleEditPart.VISUAL_ID) {
				result.add(new ModelNodeDescriptor(childElement, visualID));
				continue;
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getContainedLinks(View view) {
		switch (ModelVisualIDRegistry.getVisualID(view)) {
		case WorkspaceEditPart.VISUAL_ID:
			return getWorkspace_1000ContainedLinks(view);
		case ActorsPackageEditPart.VISUAL_ID:
			return getActorsPackage_2001ContainedLinks(view);
		case SeriesPackageEditPart.VISUAL_ID:
			return getSeriesPackage_2002ContainedLinks(view);
		case SeasonPackageEditPart.VISUAL_ID:
			return getSeasonPackage_2015ContainedLinks(view);
		case EpisodesPackageEditPart.VISUAL_ID:
			return getEpisodesPackage_2016ContainedLinks(view);
		case ActorEditPart.VISUAL_ID:
			return getActor_2010ContainedLinks(view);
		case SerieEditPart.VISUAL_ID:
			return getSerie_2011ContainedLinks(view);
		case SeasonEditPart.VISUAL_ID:
			return getSeason_2012ContainedLinks(view);
		case EpisodeEditPart.VISUAL_ID:
			return getEpisode_2008ContainedLinks(view);
		case RoleEditPart.VISUAL_ID:
			return getRole_2009ContainedLinks(view);
		case SeriesPackSerieEditPart.VISUAL_ID:
			return getSeriesPackSerie_4001ContainedLinks(view);
		case ActorPackActorEditPart.VISUAL_ID:
			return getActorPackActor_4002ContainedLinks(view);
		case SeasonsPackSeasonEditPart.VISUAL_ID:
			return getSeasonsPackSeason_4003ContainedLinks(view);
		case EpisodesPackEpisodeEditPart.VISUAL_ID:
			return getEpisodesPackEpisode_4004ContainedLinks(view);
		case SerieRoleEditPart.VISUAL_ID:
			return getSerieRole_4005ContainedLinks(view);
		case AssociationActorToSerieEditPart.VISUAL_ID:
			return getAssociationActorToSerie_4006ContainedLinks(view);
		}
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getIncomingLinks(View view) {
		switch (ModelVisualIDRegistry.getVisualID(view)) {
		case ActorsPackageEditPart.VISUAL_ID:
			return getActorsPackage_2001IncomingLinks(view);
		case SeriesPackageEditPart.VISUAL_ID:
			return getSeriesPackage_2002IncomingLinks(view);
		case SeasonPackageEditPart.VISUAL_ID:
			return getSeasonPackage_2015IncomingLinks(view);
		case EpisodesPackageEditPart.VISUAL_ID:
			return getEpisodesPackage_2016IncomingLinks(view);
		case ActorEditPart.VISUAL_ID:
			return getActor_2010IncomingLinks(view);
		case SerieEditPart.VISUAL_ID:
			return getSerie_2011IncomingLinks(view);
		case SeasonEditPart.VISUAL_ID:
			return getSeason_2012IncomingLinks(view);
		case EpisodeEditPart.VISUAL_ID:
			return getEpisode_2008IncomingLinks(view);
		case RoleEditPart.VISUAL_ID:
			return getRole_2009IncomingLinks(view);
		case SeriesPackSerieEditPart.VISUAL_ID:
			return getSeriesPackSerie_4001IncomingLinks(view);
		case ActorPackActorEditPart.VISUAL_ID:
			return getActorPackActor_4002IncomingLinks(view);
		case SeasonsPackSeasonEditPart.VISUAL_ID:
			return getSeasonsPackSeason_4003IncomingLinks(view);
		case EpisodesPackEpisodeEditPart.VISUAL_ID:
			return getEpisodesPackEpisode_4004IncomingLinks(view);
		case SerieRoleEditPart.VISUAL_ID:
			return getSerieRole_4005IncomingLinks(view);
		case AssociationActorToSerieEditPart.VISUAL_ID:
			return getAssociationActorToSerie_4006IncomingLinks(view);
		}
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getOutgoingLinks(View view) {
		switch (ModelVisualIDRegistry.getVisualID(view)) {
		case ActorsPackageEditPart.VISUAL_ID:
			return getActorsPackage_2001OutgoingLinks(view);
		case SeriesPackageEditPart.VISUAL_ID:
			return getSeriesPackage_2002OutgoingLinks(view);
		case SeasonPackageEditPart.VISUAL_ID:
			return getSeasonPackage_2015OutgoingLinks(view);
		case EpisodesPackageEditPart.VISUAL_ID:
			return getEpisodesPackage_2016OutgoingLinks(view);
		case ActorEditPart.VISUAL_ID:
			return getActor_2010OutgoingLinks(view);
		case SerieEditPart.VISUAL_ID:
			return getSerie_2011OutgoingLinks(view);
		case SeasonEditPart.VISUAL_ID:
			return getSeason_2012OutgoingLinks(view);
		case EpisodeEditPart.VISUAL_ID:
			return getEpisode_2008OutgoingLinks(view);
		case RoleEditPart.VISUAL_ID:
			return getRole_2009OutgoingLinks(view);
		case SeriesPackSerieEditPart.VISUAL_ID:
			return getSeriesPackSerie_4001OutgoingLinks(view);
		case ActorPackActorEditPart.VISUAL_ID:
			return getActorPackActor_4002OutgoingLinks(view);
		case SeasonsPackSeasonEditPart.VISUAL_ID:
			return getSeasonsPackSeason_4003OutgoingLinks(view);
		case EpisodesPackEpisodeEditPart.VISUAL_ID:
			return getEpisodesPackEpisode_4004OutgoingLinks(view);
		case SerieRoleEditPart.VISUAL_ID:
			return getSerieRole_4005OutgoingLinks(view);
		case AssociationActorToSerieEditPart.VISUAL_ID:
			return getAssociationActorToSerie_4006OutgoingLinks(view);
		}
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getWorkspace_1000ContainedLinks(
			View view) {
		Workspace modelElement = (Workspace) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_AssociationActorToSerie_4006(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorsPackage_2001ContainedLinks(
			View view) {
		ActorsPackage modelElement = (ActorsPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_ActorPackActor_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackage_2002ContainedLinks(
			View view) {
		SeriesPackage modelElement = (SeriesPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SeriesPackSerie_4001(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonPackage_2015ContainedLinks(
			View view) {
		SeasonPackage modelElement = (SeasonPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SeasonsPackSeason_4003(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackage_2016ContainedLinks(
			View view) {
		EpisodesPackage modelElement = (EpisodesPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_EpisodesPackEpisode_4004(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActor_2010ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerie_2011ContainedLinks(
			View view) {
		Serie modelElement = (Serie) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SerieRole_4005(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeason_2012ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisode_2008ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getRole_2009ContainedLinks(View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackSerie_4001ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorPackActor_4002ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonsPackSeason_4003ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackEpisode_4004ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerieRole_4005ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getAssociationActorToSerie_4006ContainedLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorsPackage_2001IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackage_2002IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonPackage_2015IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackage_2016IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActor_2010IncomingLinks(View view) {
		Actor modelElement = (Actor) view.getElement();
		Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getIncomingTypeModelFacetLinks_ActorPackActor_4002(
				modelElement, crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerie_2011IncomingLinks(View view) {
		Serie modelElement = (Serie) view.getElement();
		Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getIncomingTypeModelFacetLinks_SeriesPackSerie_4001(
				modelElement, crossReferences));
		result.addAll(getIncomingTypeModelFacetLinks_AssociationActorToSerie_4006(
				modelElement, crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeason_2012IncomingLinks(
			View view) {
		Season modelElement = (Season) view.getElement();
		Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getIncomingTypeModelFacetLinks_SeasonsPackSeason_4003(
				modelElement, crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisode_2008IncomingLinks(
			View view) {
		Episode modelElement = (Episode) view.getElement();
		Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getIncomingTypeModelFacetLinks_EpisodesPackEpisode_4004(
				modelElement, crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getRole_2009IncomingLinks(View view) {
		Role modelElement = (Role) view.getElement();
		Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getIncomingTypeModelFacetLinks_SerieRole_4005(
				modelElement, crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackSerie_4001IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorPackActor_4002IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonsPackSeason_4003IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackEpisode_4004IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerieRole_4005IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getAssociationActorToSerie_4006IncomingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorsPackage_2001OutgoingLinks(
			View view) {
		ActorsPackage modelElement = (ActorsPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_ActorPackActor_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackage_2002OutgoingLinks(
			View view) {
		SeriesPackage modelElement = (SeriesPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SeriesPackSerie_4001(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonPackage_2015OutgoingLinks(
			View view) {
		SeasonPackage modelElement = (SeasonPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SeasonsPackSeason_4003(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackage_2016OutgoingLinks(
			View view) {
		EpisodesPackage modelElement = (EpisodesPackage) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_EpisodesPackEpisode_4004(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActor_2010OutgoingLinks(View view) {
		Actor modelElement = (Actor) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getOutgoingTypeModelFacetLinks_AssociationActorToSerie_4006(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerie_2011OutgoingLinks(View view) {
		Serie modelElement = (Serie) view.getElement();
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		result.addAll(getContainedTypeModelFacetLinks_SerieRole_4005(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeason_2012OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisode_2008OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getRole_2009OutgoingLinks(View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeriesPackSerie_4001OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getActorPackActor_4002OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSeasonsPackSeason_4003OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getEpisodesPackEpisode_4004OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getSerieRole_4005OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	public static List<ModelLinkDescriptor> getAssociationActorToSerie_4006OutgoingLinks(
			View view) {
		return Collections.emptyList();
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_SeriesPackSerie_4001(
			SeriesPackage container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getAggregatedSerie().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof SeriesPackSerie) {
				continue;
			}
			SeriesPackSerie link = (SeriesPackSerie) linkObject;
			if (SeriesPackSerieEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Serie dst = link.getSerie();
			result.add(new ModelLinkDescriptor(container, dst, link,
					ModelElementTypes.SeriesPackSerie_4001,
					SeriesPackSerieEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_ActorPackActor_4002(
			ActorsPackage container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getAggergatedActor().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof ActorPackActor) {
				continue;
			}
			ActorPackActor link = (ActorPackActor) linkObject;
			if (ActorPackActorEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Actor dst = link.getActor();
			result.add(new ModelLinkDescriptor(container, dst, link,
					ModelElementTypes.ActorPackActor_4002,
					ActorPackActorEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_SeasonsPackSeason_4003(
			SeasonPackage container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getAggregatedSeason().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof SeasonsPackSeason) {
				continue;
			}
			SeasonsPackSeason link = (SeasonsPackSeason) linkObject;
			if (SeasonsPackSeasonEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Season dst = link.getSeason();
			result.add(new ModelLinkDescriptor(container, dst, link,
					ModelElementTypes.SeasonsPackSeason_4003,
					SeasonsPackSeasonEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_EpisodesPackEpisode_4004(
			EpisodesPackage container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getEpisodeComponent().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof EpisodesPackEpisode) {
				continue;
			}
			EpisodesPackEpisode link = (EpisodesPackEpisode) linkObject;
			if (EpisodesPackEpisodeEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Episode dst = link.getEpisode();
			result.add(new ModelLinkDescriptor(container, dst, link,
					ModelElementTypes.EpisodesPackEpisode_4004,
					EpisodesPackEpisodeEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_SerieRole_4005(
			Serie container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getRolesComponet().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof SerieRole) {
				continue;
			}
			SerieRole link = (SerieRole) linkObject;
			if (SerieRoleEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Role dst = link.getRole();
			result.add(new ModelLinkDescriptor(container, dst, link,
					ModelElementTypes.SerieRole_4005,
					SerieRoleEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getContainedTypeModelFacetLinks_AssociationActorToSerie_4006(
			Workspace container) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getAssociations().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof AssociationActorToSerie) {
				continue;
			}
			AssociationActorToSerie link = (AssociationActorToSerie) linkObject;
			if (AssociationActorToSerieEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Serie dst = link.getSource();
			Actor src = link.getTarget();
			result.add(new ModelLinkDescriptor(src, dst, link,
					ModelElementTypes.AssociationActorToSerie_4006,
					AssociationActorToSerieEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_SeriesPackSerie_4001(
			Serie target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getSeriesPackSerie_Serie()
					|| false == setting.getEObject() instanceof SeriesPackSerie) {
				continue;
			}
			SeriesPackSerie link = (SeriesPackSerie) setting.getEObject();
			if (SeriesPackSerieEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			if (false == link.eContainer() instanceof SeriesPackage) {
				continue;
			}
			SeriesPackage container = (SeriesPackage) link.eContainer();
			result.add(new ModelLinkDescriptor(container, target, link,
					ModelElementTypes.SeriesPackSerie_4001,
					SeriesPackSerieEditPart.VISUAL_ID));

		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_ActorPackActor_4002(
			Actor target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getActorPackActor_Actor()
					|| false == setting.getEObject() instanceof ActorPackActor) {
				continue;
			}
			ActorPackActor link = (ActorPackActor) setting.getEObject();
			if (ActorPackActorEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			if (false == link.eContainer() instanceof ActorsPackage) {
				continue;
			}
			ActorsPackage container = (ActorsPackage) link.eContainer();
			result.add(new ModelLinkDescriptor(container, target, link,
					ModelElementTypes.ActorPackActor_4002,
					ActorPackActorEditPart.VISUAL_ID));

		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_SeasonsPackSeason_4003(
			Season target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getSeasonsPackSeason_Season()
					|| false == setting.getEObject() instanceof SeasonsPackSeason) {
				continue;
			}
			SeasonsPackSeason link = (SeasonsPackSeason) setting.getEObject();
			if (SeasonsPackSeasonEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			if (false == link.eContainer() instanceof SeasonPackage) {
				continue;
			}
			SeasonPackage container = (SeasonPackage) link.eContainer();
			result.add(new ModelLinkDescriptor(container, target, link,
					ModelElementTypes.SeasonsPackSeason_4003,
					SeasonsPackSeasonEditPart.VISUAL_ID));

		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_EpisodesPackEpisode_4004(
			Episode target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getEpisodesPackEpisode_Episode()
					|| false == setting.getEObject() instanceof EpisodesPackEpisode) {
				continue;
			}
			EpisodesPackEpisode link = (EpisodesPackEpisode) setting
					.getEObject();
			if (EpisodesPackEpisodeEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			if (false == link.eContainer() instanceof EpisodesPackage) {
				continue;
			}
			EpisodesPackage container = (EpisodesPackage) link.eContainer();
			result.add(new ModelLinkDescriptor(container, target, link,
					ModelElementTypes.EpisodesPackEpisode_4004,
					EpisodesPackEpisodeEditPart.VISUAL_ID));

		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_SerieRole_4005(
			Role target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getSerieRole_Role()
					|| false == setting.getEObject() instanceof SerieRole) {
				continue;
			}
			SerieRole link = (SerieRole) setting.getEObject();
			if (SerieRoleEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			if (false == link.eContainer() instanceof Serie) {
				continue;
			}
			Serie container = (Serie) link.eContainer();
			result.add(new ModelLinkDescriptor(container, target, link,
					ModelElementTypes.SerieRole_4005,
					SerieRoleEditPart.VISUAL_ID));

		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getIncomingTypeModelFacetLinks_AssociationActorToSerie_4006(
			Serie target,
			Map<EObject, Collection<EStructuralFeature.Setting>> crossReferences) {
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		Collection<EStructuralFeature.Setting> settings = crossReferences
				.get(target);
		for (EStructuralFeature.Setting setting : settings) {
			if (setting.getEStructuralFeature() != ModelPackage.eINSTANCE
					.getAssociationActorSerie_Source()
					|| false == setting.getEObject() instanceof AssociationActorToSerie) {
				continue;
			}
			AssociationActorToSerie link = (AssociationActorToSerie) setting
					.getEObject();
			if (AssociationActorToSerieEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Actor src = link.getTarget();
			result.add(new ModelLinkDescriptor(src, target, link,
					ModelElementTypes.AssociationActorToSerie_4006,
					AssociationActorToSerieEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection<ModelLinkDescriptor> getOutgoingTypeModelFacetLinks_AssociationActorToSerie_4006(
			Actor source) {
		Workspace container = null;
		// Find container element for the link.
		// Climb up by containment hierarchy starting from the source
		// and return the first element that is instance of the container class.
		for (EObject element = source; element != null && container == null; element = element
				.eContainer()) {
			if (element instanceof Workspace) {
				container = (Workspace) element;
			}
		}
		if (container == null) {
			return Collections.emptyList();
		}
		LinkedList<ModelLinkDescriptor> result = new LinkedList<ModelLinkDescriptor>();
		for (Iterator<?> links = container.getAssociations().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof AssociationActorToSerie) {
				continue;
			}
			AssociationActorToSerie link = (AssociationActorToSerie) linkObject;
			if (AssociationActorToSerieEditPart.VISUAL_ID != ModelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			Serie dst = link.getSource();
			Actor src = link.getTarget();
			if (src != source) {
				continue;
			}
			result.add(new ModelLinkDescriptor(src, dst, link,
					ModelElementTypes.AssociationActorToSerie_4006,
					AssociationActorToSerieEditPart.VISUAL_ID));
		}
		return result;
	}

}
